﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class CheckKindergartenTutorialCommand extends Command {

		[Inject]
        public var event:InfoEvent;
		[Inject]
        public var userModel:UserModel;
		[Inject]
        public var worldModel:WorldModel;
		[Inject]
        public var tutorialModel:TutorialModel;

        override public function execute():void{
            l(("execute: " + this.execute));
            if (((!(this.userModel.isVisitFriendsMode())) && ((this.userModel.level >= GameConstants.MIN_LEVEL_KINDERGARTEN)))){
                this.checkKindergartenTutorial();
            };
        }
        private function checkKindergartenTutorial():void{
            l(("checkKindergartenTutorial: " + this.checkKindergartenTutorial));
            var _local1:Boolean = this.worldModel.hasAreaType(GameConstants.TYPE_KINDERGARTEN);
            if (!_local1){
                if (!this.tutorialModel.isInTutorialMode){
                    this.tutorialModel.state = int(this.event.info);
                };
            };
        }

    }
}//package net.wooga.pets.controllers 
